﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class ConstValuesElement : SyntaxTreeElement
    {
        private List<ISyntaxTreeElement> values;

        public List<ISyntaxTreeElement> Values { get { return values; } set { values = value; } }

        public ConstValuesElement(TokenInfo StartInfo, List<ISyntaxTreeElement> Values, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            values = Values;
        }

        public override string ToString()
        {
            return string.Format("({0})", (values != null) ? values.Join(", ") : string.Empty);
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            return values.GetEnumerator();
        }
    }
}
